﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" Theme="default" %>
<%@ Register TagPrefix="samples" TagName="ShoppingCart" Src="~/ShoppingCart.ascx" %>
<%@ Register TagPrefix="samples" TagName="BooksCatalog" Src="~/BooksCatalog.ascx" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>ASP.NET AJAX BookShop</title>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="TheScriptManager" runat="server">
            <Scripts>
                <asp:ScriptReference Assembly="Microsoft.Web.Preview" Name="PreviewScript.js"/>
                <asp:ScriptReference Assembly="Microsoft.Web.Preview" Name="PreviewDragDrop.js"/>
            </Scripts>
        </asp:ScriptManager>
        
            <div id="hd" class="header">
                <span>ASP.NET AJAX BookShop</span>
            </div>
            
            <asp:UpdatePanel ID="UpdatePanel1" runat="server" 
                             ChildrenAsTriggers="true"
                             UpdateMode="conditional">
                <ContentTemplate>
                  <%-- Book List --%>
                  <samples:BooksCatalog ID="listBooks" runat="server"></samples:BooksCatalog>
                </ContentTemplate>
            </asp:UpdatePanel>
            
            <div>
                <asp:UpdateProgress ID="UpdateProgress1" runat="server">
                    <ProgressTemplate>
                        <span class="progress">Updating Cart...</span>
                    </ProgressTemplate>
                </asp:UpdateProgress>
                
                <asp:UpdatePanel ID="UpdatePanel2" runat="server"
                                 ChildrenAsTriggers="true"
                                 UpdateMode="conditional">
                    <ContentTemplate>
                        <%-- Shopping Cart --%>
                        <samples:ShoppingCart ID="shoppingCart" runat="server"></samples:ShoppingCart>
                    </ContentTemplate>                 
                </asp:UpdatePanel>
            </div>
    </form>
</body>
</html>
